@echo off
echo 设置JDK 17环境变量...
set JAVA_HOME=D:\jdk-17
set PATH=%JAVA_HOME%\bin;%PATH%

echo 当前Java版本:
java -version

echo 开始编译项目...
mvn clean compile

if %errorlevel% == 0 (
    echo 编译成功!
) else (
    echo 编译失败!
    pause
)